package me.zhengjie.modules.weixin.analyzer;

import me.zhengjie.modules.weixin.dto.WeChatAccount;
import me.zhengjie.modules.weixin.dto.WeChatMessage;
import me.zhengjie.modules.weixin.message.AnalyzerReplyMessage;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * analyzer 抽象父类
 */
public abstract class AbstractAnalyzer {

    protected WeChatAccount account;

    protected Map<String, Object> message;

    /**
     * 需子类各自实现
     *
     * @return
     */
    public abstract WeChatMessage analyze();

    protected List<AnalyzerReplyMessage> getDefaultReply(String appId, String type, Map<String, Object> message) {
        List<AnalyzerReplyMessage> replies = new ArrayList<>();

        return replies;
    }

    public WeChatAccount getAccount() {
        return account;
    }

    public void setAccount(WeChatAccount account) {
        this.account = account;
    }

    public Map<String, Object> getMessage() {
        return message;
    }

    public void setMessage(Map<String, Object> message) {
        this.message = message;
    }
}
